<!doctype html>
<html lang="en">

	<head>
		<meta charset="utf-8">
		<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
		<title>ng-Todo</title>
		<link rel="stylesheet" href="../static/ng-todo/src/base.css">
	</head>

	<body>
		<section id="todoapp" ng-controller="MainCtrl">
			<header id="header">
				<h1 ng-bind="title"></h1>
				<input id="new-todo" ng-model="newTodo" ng-keypress="createOnEnter($event)" placeholder="What needs to be done?" autofocus>
			</header>
			<section id="main">
				<input id="toggle-all" type="checkbox" ng-click="toggleAll($event)">
				<label for="toggle-all">Mark all as complete</label>
				<ul id="todo-list" ng-hide="hidden">
					<li ng-repeat="todo in getTodos() track by $index" ng-class='{completed: todo.completed, editing: todo.edit}'>
						<div class="view">
							<input class="toggle" type="checkbox" ng-model="todo.completed">
							<label ng-dblclick="edit(todo, $event)" ng-bind="todo.title"></label>
							<button class="destroy" ng-click="todoService.delTodo($index)"></button>
						</div>
						<input ng-blur="close(todo)" class="edit" ng-model="todo.title">
						<li>
				</ul>
			</section>
			<footer id="footer">
				<span id="todo-count"><strong ng-bind="remaining"></strong> <span ng-bind-template="{{remaining < 1 ? 'item' : 'items'}} left"></span></span>
				<ul id="filters">
					<li>
						<a ng-class="{selected: selected('')}" href="#/" ng-click="filter('')">All</a>
					</li>
					<li>
						<a ng-class="{selected: selected(false)}" href="#/" ng-click="filter(false)">Active</a>
					</li>
					<li>
						<a ng-class="{selected: selected(true)}" href="#/" ng-click="filter(true)">Completed</a>
					</li>
				</ul>
				<button ng-show="completed" id="clear-completed" ng-click="todoService.clearCompleted()" ng-bind-template="Clear completed ({{completed}})"></button>
			</footer>
		</section>
		<footer id="info">
			<p>Double-click to edit a todo</p>
			<p>Originated by
				<a href="https://github.com/addyosmani">Addy Osmani</a>
			</p>
			<p>Part of
				<a href="http://todomvc.com">TodoMVC</a>
			</p>
			<p>Modified by
				<a href="http://www.linkgod.net">LinkGod</a> in March 2013</p>
		</footer>

		<script src="../sea-modules/seajs/2.2.0/sea.js"></script>
		<script>
			// Set configuration
			seajs.config({
				base: "../sea-modules/",
				alias: {
					"$": "jquery/jquery/1.10.1/jquery.js",
					"store": "gallery/store/1.3.7/store",
					"angularjs": "angular/angularjs/1.1.5/angular.js"
				}
			});
			seajs.use("../static/ng-todo/src/main", function(main) {
				main.init()
			});
		</script>

	</body>

</html>